package main

import (
	"fmt"
	"os"

	tiff "github.com/chai2010/tiff"
)

func main() {
	// Open the TIFF file
	file, err := os.Open("test_dem.tiff")
	if err != nil {
		fmt.Printf("Failed to open file: %v\n", err)
		return
	}
	defer file.Close()

	// Decode the TIFF image using the chai2010 library which supports BigTIFF
	img, err := tiff.Decode(file)
	if err != nil {
		fmt.Printf("Failed to decode TIFF: %v\n", err)
		return
	}

	fmt.Printf("TIFF loaded successfully. Dimensions: %dx%d\n", img.Bounds().Dx(), img.Bounds().Dy())
}
